package com.cardbaobao.cardbabyclient.model;

import com.cardbaobao.cardbabyclient.utils.DateTimeUtil;

/**
 * 详情点评实体
 * Created by zad
 * 2016/12/18 17:30
 */

public class DetailComment {
    /**
     * 差评数
     */
    private int negativeCommentCount;
    /**
     * 好评数
     */
    private int positiveCommentCount;
    /**
     * 当条点评id
     */
    private int id;
    /**
     * 昵称
     */
    private String username;
    /**
     * 评论时间
     */
    private String adddatetime;
    /**
     * 全部点评列表显示时间字段
     */
    private String adddatetimeApp;
    /**
     * 顶数量
     */
    private int top;
    /**
     * 踩数量
     */
    private int tread;
    /**
     * 内容
     */
    private String content;
    /**
     * 回复数
     */
    private int commentreplycount;
    /**
     * 头像
     */
    private String headimages;
    /**
     * 是否已点过赞
     */
    private boolean isUp;

    public int getNegativeCommentCount() {
        return negativeCommentCount;
    }

    public void setNegativeCommentCount(int negativeCommentCount) {
        this.negativeCommentCount = negativeCommentCount;
    }

    public int getPositiveCommentCount() {
        return positiveCommentCount;
    }

    public void setPositiveCommentCount(int positiveCommentCount) {
        this.positiveCommentCount = positiveCommentCount;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    private String tempTime;

    public String getAdddatetime() {
        if(tempTime == null){
            tempTime = DateTimeUtil.getFormatDate(adddatetime);
        }
        if(tempTime == null){
            tempTime = adddatetime;
        }
        return tempTime;
    }

    public void setAdddatetime(String adddatetime) {
        this.adddatetime = adddatetime;
    }

    public int getTop() {
        return top;
    }

    public void setTop(int top) {
        this.top = top;
    }

    public int getTread() {
        return tread;
    }

    public void setTread(int tread) {
        this.tread = tread;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getCommentreplycount() {
        return commentreplycount;
    }

    public void setCommentreplycount(int commentreplycount) {
        this.commentreplycount = commentreplycount;
    }

    public String getHeadimages() {
        return headimages;
    }

    public void setHeadimages(String headimages) {
        this.headimages = headimages;
    }

    public String getAdddatetimeApp() {
        if(tempTime == null){
            tempTime = DateTimeUtil.getFormatDate(adddatetimeApp);
        }
        if(tempTime == null){
            tempTime = adddatetimeApp;
        }
        return tempTime;
    }

    public void setAdddatetimeApp(String adddatetimeApp) {
        this.adddatetimeApp = adddatetimeApp;
    }

    public boolean isUp() {
        return isUp;
    }

    public void setUp(boolean up) {
        isUp = up;
    }
}
